package com.example.utils;

import com.example.pojo.Hr;
import org.springframework.security.core.context.SecurityContextHolder;

/**
 * @program: personnel-management
 * @description:
 * @author: ChenZhiXiang
 * @create: 2019-07-16 17:16
 **/
public class HrUtils {

    public static Hr getCurrentHr() {
        return (Hr) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
    }

}
